/** Created by CUIJA on 05-19-2017.*/

var angular = require('angular');

var coreRouter = require('./routes/core.routes');

var navMenuService = require('./services/menu.service');
var interceptor = require('./interceptor/interceptor');

var navbarController = require('./components/navbar/navbar.controller');
var navbarComponent = require('./components/navbar/navbar');

var stateChange=require('./state/state.change');

var foodService = require('./services/food.service');
var foodController = require('./controller/food.controller');

var orderService = require('./services/order.service');
var orderController = require('./controller/order.controller');
var capitaliseFilter = require('./filter/capitalise.filter');


const moduleName = 'core';

angular.module(moduleName, []).config(coreRouter)
    .factory('navMenuService', navMenuService)
    .factory('interceptor', interceptor)
    .config(function ($httpProvider) {
        $httpProvider.interceptors.push('interceptor')
    })
    .component('navbar', navbarComponent)
    .controller('navbarController', navbarController)

    .filter("capitaliseFilter", capitaliseFilter)

    .factory('foodService', foodService)
    .controller('foodController', foodController)

    .factory('orderService', orderService)
    .controller('orderController', orderController)
    
    .run(stateChange);

;

module.exports = moduleName;